
<script src="{{URL::asset('public_js/jquery-3.2.1.min.js')}}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts.js') }}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/exporting.js') }}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-more.js') }}"></script>
<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/solid-gauge.js') }}"></script>
<script src="{{URL::asset('newmobile/js/public.js') }}"></script>
<style>
    .profitchart_title {
      height: 3.0rem;
      border-top: 0.025rem solid #2e303e;
      border-bottom: 0.025rem solid #2e303e;
      padding: 0 0.6rem;
    }
    .profitchart_title .top p {
      font-size: 0.63rem;
      margin-top: 0.51rem;
      margin-bottom: 0.34rem;
      color: #cadee8;
    }
</style>
<!-- 总收益曲线图 -->
<section class="profitchart_title">
    <div class="top">
        <p>总收益</p>
    </div>
    <div class="bottom" style="display:-webkit-box;display: -moz-box;display: -ms-flexbox;display: -webkit-flex;display: flex;justify-content: space-between;align-items: center;">
        <p style="font-size: 0.6rem;color: #6c6c79;">EAI分析师收益曲线图</p>
        <p style="font-size: 0.7rem;color: #e03449;font-weight: bold;">{{$totalbballpoint}}<span style="font-size: 0.6rem;font-weight: normal;">点</span></p>
    </div>
</section>
<section class="totalprofit" style="height: 7.5rem;margin-top: 0.5rem;">
    <div style="height: 7.0rem;">
        <div id="profit_chart" style="height: 7.5rem;"></div>
    </div>
</section>
<script>
    // 总收益曲线图
    var xmydata11 = [];
    var xmypoint='{{ $totalbbpoint }}';
    var xmytime='{{ $totalbbtime }}';
    xmytime = xmytime.split(',');
    xmypoint = xmypoint.split(',');
    xmypoint.forEach(function(data,index,arr){
        xmydata11.push(+data);
    });
  profitChart(profit_chart,[xmytime,xmydata11]);
  // 总收益曲线图
function profitChart(id,data){
    var t = this;
    return new Highcharts.Chart({
        chart: {
            renderTo: id,
            type: "areaspline",
            zoomType: "xy",
            pinchType:'',// 让在移动端可以滑动
            backgroundColor: '#171922',
            height: 150
        },
        title: {
            text: null
        },
        colors: ["#ffc766"],
        legend: {
            enabled: false
        },
        credits: {
            enabled: false
        },
        exporting: {
            enabled:false
        },
        xAxis: {
            gridLineWidth: 0,
            lineColor: "#2E303E",
            tickColor: "#2E303E",
            gridLineColor: "#2E303E",
            categories:data[0],
            tickInterval: Math.ceil(data[0].length / 7),
            labels: {
                rotation: false,
            }
        },
        yAxis: {
                opposite: true, //Y轴在右侧
            gridLineWidth: 0.5,
            lineColor: "#2E303E",
            tickColor: "#2E303E",
            gridLineColor: "#22242f",
            title: {
                text: null
            },
            labels: {
            }
        },
        tooltip: {
            style: {
                color: "white"
            },
            borderWidth: 0,
            shadow: !1,
            backgroundColor: "rgba(34,34,34, 0.6)",
            shared: !0
        },
        plotOptions: {
            areaspline: {
                fillColor: {
                    linearGradient: {
                        x1: 0,
                        y1: 0,
                        x2: 0,
                        y2: 1
                    },
                    stops: [
                        [0, "#3b9ce0"],
                        [1, Highcharts.Color("#3b9ce0").setOpacity(0).get('rgba')]
                    ]
                },
                marker: {
                    radius: 0,
                    fillColor: "white",
                    lineWidth: 1,
                    lineColor: "#ffc766"
                },
                lineWidth: 1,
                states: {
                    hover: {
                        lineWidth: 1
                    }
                },
                threshold: null
            },
            series: {
                lineColor: "#3b9ce0"
            }
        },
        series: [{
            name: "盈利点位",
            data: data[1]
        }]
    })
}
</script>
